<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="author" content="wangbo">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    @keyframes myrotat {
      0%{transform: rotateY(0deg);}
      50%{transform: rotateY(-360deg);}
      100%{transform: rotateY(360deg);}
    }
    /* 1.格式化页面 */
    *{margin: 0;padding: 0;}
    body{perspective: 1000px;}
    /* 盒子是200,中轴左100,右100 */
    /* .fu{width:200px;margin: 100px auto;transition: all 10s;transform-style: preserve-3d;} */
    /* 中间的div宽200 */
    .fu{width:200px;margin: 100px auto;animation: myrotat 12s; transform-style: preserve-3d;  }
    /* .fu:hover{transform: rotateY(-360deg);} */
    /* 2.子绝父相 */
    div{position: relative;left: 0px;top: 0;color: #fff;text-align: center;line-height: 200px;font-size: 40px;}
    .fu div{width: 200px;height: 200px;position: absolute;}
    .qian{background-color: red;transform: translateZ(300px)}
    .hou{background-color: green;transform: translateZ(-300px)}
    .zhong{background-color: yellow;}
    /* 向左移动,逆时针90 */
    .zuo{background-color: blue;transform: translateX(-300px) rotateY(-90deg);}
    /* 向右移动,顺时针90 */
    .you{background-color: black;transform: translateX(300px) rotateY(90deg);}
    /* translate3d x,y ,z */
    .qian_you{background-color: aqua;transform: translate3d(200px,0px,200px) rotateY(45deg);}
    .qian_zuo{background-color: orange;transform: translate3d(-200px,0px,200px) rotateY(-45deg);}
    .hou_you{background-color: pink;transform: translate3d(200px,0px,-200px) rotateY(135deg);}
    .hou_zuo{background-color: yellowgreen;transform: translate3d(-200px,0px,-200px) rotateY(-135deg);}
  </style>
</head>
<body>
  <div class="fu">    
    <div class="qian_you">11</div>
    <div class="qian_zuo">22</div>
    <div class="hou_you">33</div>
    <div class="hou_zuo">44</div>
    <div class="qian">1</div>
    <div class="hou">2</div>
    <div class="zhong">3</div>
    <div class="zuo">4</div>
    <div class="you">5</div>
  </div>
</body>
</html>